﻿#region Usings

using NHibernate;
using NHibernate.Cfg;
using NHibernate.Dialect.Schema;

#endregion

namespace KanbanBoard.Server.Command.Infrastructure.DataAccess {
    internal static class Database {
        private static ISessionFactory sessionFactory;

        public static ISessionFactory Instance { get { return sessionFactory ?? (sessionFactory = CreateInstance()); } }

        private static ISessionFactory CreateInstance() {
            return new Configuration().Configure().BuildSessionFactory();
        }
    }
}